import { extend, RequestResultType } from "@supcon/sup-request";
import { notification } from '@supcon/supcon-5t-design';

const errorHandler = (error: RequestResultType<string>) => {
  notification.error({
    message: error.msg,
    description: error.content,
  });
};

const request = extend({
  errorHandler,
});

export default request; 